package com.ruoyi.servie.param;

import org.springframework.core.io.InputStreamSource;

import java.util.List;

public class MailParam {

    /**
     *发件服务器地址
     */
    private String mailHost;

    /**
     * 发件服务器端口
     */
    private String mailPort;

    /**
     * 邮箱地址
     */
    private String mailUserName;

    /**
     * 邮箱密码，授权码
     */
    private String mailPassword;

    /**
     * 发件人
     */
    private String mailFromUserName;

    /**
     * 收件人
     */
    private String mailToUserName;

    /**
     * 邮件主题
     */
    private String subject;

    /**
     * 邮件正文
     */
    private String text;

    /**
     * 是否是富文本，html
     */
    private Boolean isHtml;

    /**
     * 附件
     */
    private List<MailAttachment> mailAttachments;


    public List<MailAttachment> getMailAttachments() {
        return mailAttachments;
    }

    public void setMailAttachments(List<MailAttachment> mailAttachments) {
        this.mailAttachments = mailAttachments;
    }

    public MailParam(String mailHost, String mailUserName, String mailPassword) {
        this.mailHost = mailHost;
        this.mailUserName = mailUserName;
        this.mailPassword = mailPassword;
    }

    public String getMailHost() {
        return mailHost;
    }

    public void setMailHost(String mailHost) {
        this.mailHost = mailHost;
    }

    public String getMailPort() {
        return mailPort;
    }

    public void setMailPort(String mailPort) {
        this.mailPort = mailPort;
    }

    public String getMailUserName() {
        return mailUserName;
    }

    public void setMailUserName(String mailUserName) {
        this.mailUserName = mailUserName;
    }

    public String getMailPassword() {
        return mailPassword;
    }

    public void setMailPassword(String mailPassword) {
        this.mailPassword = mailPassword;
    }

    public String getMailFromUserName() {
        return mailFromUserName;
    }

    public void setMailFromUserName(String mailFromUserName) {
        this.mailFromUserName = mailFromUserName;
    }

    public String getMailToUserName() {
        return mailToUserName;
    }

    public void setMailToUserName(String mailToUserName) {
        this.mailToUserName = mailToUserName;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

   public Boolean getIsHtml() {
        if(isHtml == null){
            return false;
        }
        return isHtml;
    }

    public void setIsHtml(Boolean isHtml) {
        this.isHtml = isHtml;
    }

}


